package com.sphd.beautysalon.presenter;


import com.android.volley.VolleyError;
import com.sphd.beautysalon.view.VipJifenShowView;
import com.sphd.beautysalon.model.VipJifenShowModelImpl;

/**
* Created by Hu on 2016/12/08
*/

public class VipJifenShowPresenterImpl implements VipJifenShowPresenter {
    VipJifenShowModelImpl vipJifenShowModel;
    VipJifenShowView vipJifenShowView;

    public VipJifenShowPresenterImpl(VipJifenShowView vipJifenShowView) {
        this.vipJifenShowView = vipJifenShowView;
        vipJifenShowModel=new VipJifenShowModelImpl();
    }

    @Override
    public void addData(String url) {
        vipJifenShowView.showLoading();
        vipJifenShowModel.sendUrl(url,this);
    }

    @Override
    public void sendError(VolleyError error) {
        vipJifenShowView.dissLoading();
    }

    @Override
    public void sendRes(int res) {
        vipJifenShowView.recRes(res);
        vipJifenShowView.dissLoading();
    }
}